﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CheccCoverplateCulvertAssemble.Common.Total
{
    public class CommonRhone : MyNotifyPropertyChanged
    {
        public CommonRhone() { }
        RhoneBase _leftRhone = new RhoneBase();
        RhoneBase _rightRhone = new RhoneBase();

        /// <summary>
        /// 左侧排水槽
        /// </summary>
        public RhoneBase LeftRhone
        {
            get
            {
                return _leftRhone;
            }
            set
            {
                if (value == _leftRhone)
                    return;
                _leftRhone = value;
                NotifyPropertyChanged(() => LeftRhone);
            }
        }

        /// <summary>
        /// 右侧排水槽
        /// </summary>
        public RhoneBase RightRhone
        {
            get
            {
                return _rightRhone;
            }
            set
            {
                if (value == _rightRhone)
                    return;
                _rightRhone = value;
                NotifyPropertyChanged(() => RightRhone);
            }
        }
    }
    public class RhoneBase : MyNotifyPropertyChanged 
    {
        public double _topHeight;
        public double _lowHeight;
        public double _length;
        public double _longitudinalSlopeOfEntrance;
        public double _topWidth;
        public double _widenOnOneSide;
        public double _insideGrade;
        public double _outsideGrade;
        public double _grooveBottomThickness;

        public RhoneBase() { }

        public RhoneBase(double TopHeight, double LowHeight, double Length, double LongitudinalSlopeOfEntrance, double TopWidth, double WidenOnOneSide, double InsideGrade, double OutsideGrade, double GrooveBottomThickness)
        {
            _topHeight = TopHeight;
            _lowHeight = LowHeight;
            _length = Length;
            _longitudinalSlopeOfEntrance = LongitudinalSlopeOfEntrance;
            _topWidth = TopWidth;
            _widenOnOneSide = WidenOnOneSide;
            _insideGrade = InsideGrade;
            _outsideGrade = OutsideGrade;
            _grooveBottomThickness = GrooveBottomThickness;
        }

        #region 排水槽属性
        /// <summary>
        /// 高端高度
        /// </summary>
        public double TopHeight
        {
            get
            {
                return _topHeight;
            }
            set
            {
                if (value == _topHeight)
                    return;
                _topHeight = value;
                NotifyPropertyChanged(() => TopHeight);
            }
        }
        /// <summary>
        /// 低端高度
        /// </summary>
        public double LowHeight
        {
            get
            {
                return _lowHeight;
            }
            set
            {
                if (value == _lowHeight)
                    return;
                _lowHeight = value;
                NotifyPropertyChanged(() => LowHeight);
            }
        }
        /// <summary>
        /// 排水槽长
        /// </summary>
        public double Length
        {
            get
            {
                return _length;
            }
            set
            {
                if (value == _length)
                    return;
                _length = value;
                NotifyPropertyChanged(() => Length);
            }
        }
        /// <summary>
        /// 洞口纵坡(1:n)
        /// </summary>
        public double LongitudinalSlopeOfEntrance
        {
            get
            {
                return _longitudinalSlopeOfEntrance;
            }
            set
            {
                if (value == _longitudinalSlopeOfEntrance)
                    return;
                _longitudinalSlopeOfEntrance = value;
                NotifyPropertyChanged(() => LongitudinalSlopeOfEntrance);
            }
        }
        /// <summary>
        /// 顶部宽
        /// </summary>
        public double TopWidth
        {
            get
            {
                return _topWidth;
            }
            set
            {
                if (value == _topWidth)
                    return;
                _topWidth = value;
                NotifyPropertyChanged(() => TopWidth);
            }
        }
        /// <summary>
        /// 单侧加宽
        /// </summary>
        public double WidenOnOneSide
        {
            get
            {
                return _widenOnOneSide;
            }
            set
            {
                if (value == _widenOnOneSide)
                    return;
                _widenOnOneSide = value;
                NotifyPropertyChanged(() => WidenOnOneSide);
            }
        }
        /// <summary>
        /// 内侧坡度(1:n)
        /// </summary>
        public double InsideGrade
        {
            get
            {
                return _widenOnOneSide;
            }
            set
            {
                if (value == _widenOnOneSide)
                    return;
                _widenOnOneSide = value;
                NotifyPropertyChanged(() => InsideGrade);
            }
        }
        /// <summary>
        /// 外侧坡度(1:n)
        /// </summary>
        public double OutsideGrade
        {
            get
            {
                return _outsideGrade;
            }
            set
            {
                if (value == _outsideGrade)
                    return;
                _outsideGrade = value;
                NotifyPropertyChanged(() => OutsideGrade);
            }
        }
        /// <summary>
        /// 槽底厚度
        /// </summary>
        public double GrooveBottomThickness
        {
            get
            {
                return _grooveBottomThickness;
            }
            set
            {
                if (value == _grooveBottomThickness)
                    return;
                _grooveBottomThickness = value;
                NotifyPropertyChanged(() => GrooveBottomThickness);
            }
        }
        #endregion
    }
}
